using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Konst3d.Efficiency
{
    public static class Comparer
    {
        public static float FloatEpsilon
        {
            get;
            set;
        }

        public static double DoubleEpsilon
        {
            get;
            set;
        }

        static Comparer()
        {
            FloatEpsilon = 0.001f;
            DoubleEpsilon = 0.001;
        }

        public static bool Equals(float f1, float f2)
        {
            bool res = Math.Abs(f1 - f2) <= FloatEpsilon;
            return res;
        }

        public static bool Equals(double d1, double d2)
        {
            bool res = Math.Abs(d1 - d2) <= DoubleEpsilon;
            return res;
        }
    }
}
